﻿//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1998-2024 Glodon Company Limited.
//
// Licensed under the MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the “Software”),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//////////////////////////////////////////////////////////////////////////////
#pragma once

#include "GmStructure.h"
#include "IStructureColumn.h"
#include "StructureInstanceEndType.h"
#include "GbmpBuiltInParameterStaticVauleListItems.h"

namespace gcmp
{
    class IInstance;
    struct StructureColumnInput;

    /// \brief 结构柱斜柱数据接口
    class GM_STRUCTURE_EXPORT IStructureSlantedColumn:public IStructureColumn
    {
    public:
        /// \brief 创建结构柱斜柱
        /// \param pInput 结构斜柱输入数据
        /// \return nullptr-创建失败；非nullptr-创建成功
        static IStructureSlantedColumn *Create(const StructureColumnInput* pInput);

        /// \brief 获取结构柱斜柱
        /// \param pInstance 构件实例指针
        /// \return nullptr-获取失败；非nullptr-获取成功
        static IStructureSlantedColumn* Get(IInstance* pInstance);
        static const IStructureSlantedColumn* Get(const IInstance* pInstance);

    public:
        /// \brief 设置顶部截面样式
        /// \param sectionType 新的截面样式
        /// \return void
        virtual void SetTopSectionType(InstanceEndType sectionType) = 0;
        /// \brief 获取顶部截面样式
        /// \return 顶部截面样式
        virtual InstanceEndType GetTopSectionType() const = 0;
        /// \brief 设置底部截面样式
        /// \param sectionType 新的截面样式
        /// \return void
        virtual void SetBottomSectionType(InstanceEndType sectionType) = 0;
        /// \brief 获取底部截面样式
        /// \return 底部截面样式
        virtual InstanceEndType GetBottomSectionType() const = 0;
    };
}
